package cm.example.shoppingplatformspringboot.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单实体类
 */
@Data
public class Order {
    private Integer id;
    private String no;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date add_time;
    private Integer user_id;
    private BigDecimal total_money;
    private String address;
    private String accept;
    private String telphone;
    private String pay_type;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date pay_time;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date finish_time;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date send_time;
    private String status;//0.已删除 1.待支付 2.已支付 3.已发货 4.已完成 5.已取消
    List<OrderItem> items;
    private Invoice invoice;
}